home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 22 / CU Amiga Magazine's Super CD-ROM 22 (1998)(EMAP Images)(GB)[!][issue 1998-05].iso / PowerPC / Programming / PPCSmallEiffel / lib_se / proc_call.e < prev    next >
Encoding:
Text File  |  1998-01-16  |  2.3 KB  |  81 lines

  1. --          This file is part of SmallEiffel The GNU Eiffel Compiler.
  2. --          Copyright (C) 1994-98 LORIA - UHP - CRIN - INRIA - FRANCE
  3. --            Dominique COLNET and Suzanne COLLIN - colnet@loria.fr 
  4. --                       http://www.loria.fr/SmallEiffel
  5. -- SmallEiffel is  free  software;  you can  redistribute it and/or modify it 
  6. -- under the terms of the GNU General Public License as published by the Free
  7. -- Software  Foundation;  either  version  2, or (at your option)  any  later 
  8. -- version. SmallEiffel is distributed in the hope that it will be useful,but
  9. -- WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  10. -- or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU General Public License 
  11. -- for  more  details.  You  should  have  received a copy of the GNU General 
  12. -- Public  License  along  with  SmallEiffel;  see the file COPYING.  If not,
  13. -- write to the  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  14. -- Boston, MA 02111-1307, USA.
  15. --
  16. deferred class PROC_CALL
  17. --
  18. -- For all sort of procedure calls.
  19. -- Does not include function calls (see CALL).
  20. --
  21. -- Classification: E_PROC_0 when 0 argument, PROC_CALL_1 when 
  22. -- 1 argument and PROC_CALL_N when N arguments.
  23. --
  24.    
  25. inherit
  26.    CALL_PROC_CALL
  27.       undefine fill_tagged_out_memory
  28.       end;
  29.    INSTRUCTION;
  30.    
  31. feature 
  32.    
  33.    is_pre_computable: BOOLEAN is false;
  34.  
  35.    end_mark_comment: BOOLEAN is false;
  36.  
  37.    frozen compile_to_c is
  38.       do
  39.      cpp.rs_push_position('3',start_position);
  40.      call_proc_call_c2c;
  41.      cpp.rs_pop_position;
  42.       end;
  43.  
  44. feature {CREATION_CALL}
  45.  
  46.    make_runnable(rc: like run_compound; 
  47.          w: like target; a: like arguments;
  48.          rf: RUN_FEATURE): like Current is
  49.       deferred
  50.       end;
  51.  
  52. feature {PROC_CALL}
  53.  
  54.    set_run_feature(rf: like run_feature) is
  55.       do
  56.      run_feature := rf;
  57.       ensure
  58.      run_feature = rf
  59.       end;
  60.  
  61. feature {NONE}
  62.    
  63.    to_runnable_0(rc: like run_compound) is
  64.      -- Set `current_type', `target' and `run_feature'.
  65.       require
  66.      run_compound = Void;
  67.       do
  68.      run_compound := rc;
  69.      cpc_to_runnable(current_type);
  70.      if run_feature.result_type /= Void then
  71.         eh.add_position(run_feature.start_position);
  72.         error(feature_name.start_position,
  73.           "Feature found is not a procedure.");
  74.      end;
  75.       ensure
  76.      run_compound = rc;
  77.       end;
  78.    
  79. end -- PROC_CALL
  80.  
  81.